package com.suixun.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class TestController {

	@RequestMapping(value = "/hello")
	public ModelAndView test(ModelAndView mv) {
		mv.setViewName("Hello");
		mv.addObject("title", "欢迎使用Thymeleaf!");
		return mv;
	}

	@RequestMapping(value = "/test")
	public ModelAndView test2(ModelAndView mv) {
		mv.setViewName("test");
		mv.addObject("title", "欢迎使用Thymeleaf!");
		return mv;
	}
}
